# structure/SConstruct
#
# SCons buildfile for "dataConverter"
#
######################################

import os;
import sys;

occRoot     = os.getenv ('OPEN_CASCADE_ROOT')
peanoSrc   = os.getenv ('PEANO_SRC')
boostRoot   = os.getenv ('BOOST_ROOT')
preciceRoot = os.getenv ('PRECICE_ROOT')

##preciceRoot = os.getenv ('OPEN_CASCADE_ROOT')

 
if ( occRoot == None ):
   print 'ERROR: Environment variable OPEN_CASCADE_ROOT not defined!'
   sys.exit(1)
else:
   print 'Using environment variable OPEN_CASCADE_ROOT =', occRoot
   
buildmode = 'debug'

cppdefines = []
libpath = [ occRoot + '/lib' ]
cpppath = [ occRoot + '/inc', 
            boostRoot, 
            peanoSrc, 
            preciceRoot 
          ]
libs = ['TKIGES','TKSTEP','TKVRML','dl']

ccflags = []
ccflags.append('-g3')
ccflags.append('-O0')
cxx = 'g++'

env = Environment ( 
   CPPDEFINES = cppdefines,      # defines for preprocessor (#define xyz)
   LIBPATH    = libpath,         # path to libraries used
   LIBS       = libs,            # libraries used (without prefix "lib" and suffix ".a"/".so"/...)
   CPPPATH    = cpppath,         # pathes where the preprocessor should look for files
   CCFLAGS    = ccflags,         # flags for the c/c++ compilers
   CXX = cxx                     # the c++ compiler that should be used
   )
   
env.Program ( 'DataConverter', Glob('*.cpp') )
